package com.qf.smartdevice.mapper;

import com.qf.smartdevice.pojo.Categories;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoriesMapper {
    @Select("select * from categories")
    List<Categories> findAll();

    @Insert("insert into categories value(null,#{categoryname},#{txcommand},#{rxcommand},#{commandname},#{status})")
    int addCategories(Categories categories);

    int deleteCategories(@Param("id") Integer[] id);

    int updateById(Categories categories);

}
